CC = gcc
CFLAGS = -Wall

all: parse_file

parse_file: lex.yy.c myfile.tab.c
	$(CC) $(CFLAGS) -o $@ lex.yy.c myfile.tab.c

lex.yy.c: myfile.l myfile.tab.h
	flex myfile.l

myfile.tab.c myfile.tab.h: myfile.y
	bison -d myfile.y

clean:
	rm -f parse_file lex.yy.c myfile.tab.c myfile.tab.h